package org.ws.kardex.utils;

import java.util.List;

/**
 *
 * @author gerardino
 */
public class Methods {

    
    public static String messageListToHtml(List<String> messages){
        String result = "";
        
        if (messages != null){
            if (messages.isEmpty()){

            } else if (messages.size() == 1){
                result = messages.get(0);
            } else {
                result = "<ul>\n";
                for(String e : messages){
                    result += "\t<li>"+ e +"</li>\n";
                }
                result += "</ul>\n";
            }
        }
        return result;
    }
    
    
}
